'use client';

import React from 'react';
import { Button, Space, Card } from 'antd';
import { useRouter } from 'next/navigation';

export default function Home() {
  const router = useRouter();

  return (
    <div style={{ 
      display: 'flex', 
      justifyContent: 'center', 
      alignItems: 'center', 
      minHeight: '100vh',
      padding: '24px'
    }}>
      <Card style={{ 
        width: '100%', 
        maxWidth: 400, 
        textAlign: 'center',
        boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)'
      }}>
        <Space direction="vertical" size="large" style={{ width: '100%' }}>
          <h2 style={{ marginBottom: 0 }}>License管理系统</h2>
          <p>请选择操作模式</p>
          
          <Space direction="vertical" size="large" style={{ width: '100%', marginTop: 24 }}>
            <Button 
              type="primary" 
              size="large" 
              style={{ width: '100%' }}
              onClick={() => router.push('/license-generator')}
            >
              单个生成License
            </Button>
            
            <Button 
              type="primary" 
              size="large" 
              style={{ width: '100%' }}
              onClick={() => router.push('/batch-generate')}
            >
              批量生成License
            </Button>
          </Space>
        </Space>
      </Card>
    </div>
  );
}
